package com.it00zyq.admin.controller;

import com.it00zyq.admin.service.TypeService;
import com.it00zyq.common.utils.R;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author zyq
 * @Date 2022/4/29 16:41
 * @Description TODO
 * @Version 1.0
 **/
@RestController
@RequestMapping("/api/type")
@RequiredArgsConstructor
public class TypeController {

    private final TypeService service;

    /**
     * 文章类型列表，用于筛选
     */
    @GetMapping
    public R list() {
        return R.ok().data(service.list());
    }


}
